import Vue from 'vue'
import Router from 'vue-router'
import routes from './router'
import {getToken} from "../../../util";

Vue.use(Router)

const router = new Router({
  routes,
  mode: 'hash'
})

const LOGIN_PAGE_NAME = 'login'

const INDEX_PAGE_NAME = 'index'

router.beforeEach((to, from, next) => {
  const token = getToken()
  next()
  // if (!token) {
  //   window.location.href = '/Frame/LoginMDM.htm'
  // } else {
  //   next()
  // }
})

export default router
